<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Feed</title>
<script type="text/javascript">
var oXslDom=[];
var oXmlDomTypes=[];
//Based on http://www.developer.com/xml/article.php/3630526
function loadXML(url){
	var httpRequest;
    httpRequest = new XMLHttpRequest();	
	httpRequest.overrideMimeType('text/xml');	
    httpRequest.open('GET', url, false);
    httpRequest.send(null);	
	return httpRequest.responseXML;	
}

function init(){
	//XSL Stylesheets
	oXslDom['single']=loadXML("chrome://footbar/content/xml/srv-single.xsl");
	oXslDom['multiple']=loadXML("chrome://footbar/content/xml/srv-multiple.xsl");
	
	//FilePath 
	oXmlDomTypes['single']="chrome://footbar/content/xml/srv-single-display.xml";
	oXmlDomTypes['multiple']="chrome://footbar/content/xml/srv-multiple-display.xml";
}

function execute(mode){
	var oXmlDom=loadXML(oXmlDomTypes[mode]);
	
	var oProcessor = new XSLTProcessor()
	oProcessor.importStylesheet(oXslDom[mode]);
	var oResultDom = oProcessor.transformToDocument(oXmlDom);

	 var serializer = new XMLSerializer();
	 var oDiv=document.getElementById('divResult');
	 var returnValue=serializer.serializeToString(oResultDom);
     oDiv.innerHTML=unescapeXML(returnValue); 
}
function unescapeXML(str){
	str = str.replace(/&lt;/g, '<');
	str = str.replace(/&gt;/g, '>');
	str = str.replace(/&amp;/g, '&');
	str = str.replace(/CDATA_START;/g,'<![CDATA');
	str = str.replace(/CDATA_END;/g, ']]>');
	return str;
}
</script>
<style type="text/css">
#trucoder-feed-single-container{
font-family:"Times New Roman", Times, serif
font-size:1.1em;
}
#trucoder-feed-single-container h1{
font-size:1em;
font-family:Georgia, "Times New Roman", Times, serif;
}

#trucoder-feed-single-posted{
	font-size:.9em;
	color:#999999;
	
}
#trucoder-feed-single-description{
	font-size  : 1em;
	line-height: 1.5em;
	padding-top:10px;
}

#trucoder-feed-single-header{
font-family:"Trebuchet MS";
padding:5px;
border:1px solid #666666;
background-color: #F9F9F0;
border:1px dotted #E0E0E0;
padding: 20px;
}


#trucoder-feed-single-header h1{
	color: #33CC00;
	font: bold 1.2em Arial, Verdana, Helvetica, Sans-serif;
	margin : 0;
	padding: 0;
}
#trucoder-feed-single-header-description{
	color:#666666;
}
</style>
</head>
<body>
<div id="divResult">&nbsp;</div>
<script>
init();
</script>
</body>
</html>
